package com.moyu.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.moyu.admin.service.ISysUserLoginService;
import com.moyu.data.domain.SysUserLogin;
import com.moyu.data.dao.SysUserLoginMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author makun
 * @since 2019-02-22
 */
@Service
public class SysUserLoginServiceImpl extends ServiceImpl<SysUserLoginMapper, SysUserLogin> implements
    ISysUserLoginService {
  @Autowired
  private SysUserLoginMapper sysUserLoginMapper;

  @Override
  public SysUserLogin findByName(String name) {
    QueryWrapper qw = new QueryWrapper();
    qw.eq("username", name);
    return sysUserLoginMapper.selectOne(qw);
  }
}
